//
//  ViewController.m
//  出行助手
//
//  Created by DHY on 16/8/12.
//  Copyright © 2016年 110. All rights reserved.
//

#import "ViewController.h"
#import "ListTableViewController.h"

@interface ViewController ()

@property(strong, nonatomic)UITextField *textField;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.textField = [[UITextField alloc]initWithFrame:CGRectMake(100, 150, 100, 40)];
    self.view.backgroundColor = [UIColor cyanColor];
    self.textField.placeholder = @"请输入要检索的关键字";
    self.textField.backgroundColor = [UIColor whiteColor];
    self.textField.text = @"酒店";
    [self.view addSubview:self.textField];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"->" style:(UIBarButtonItemStyleDone) target:self action:@selector(nextAction)];
    
}

-(void)nextAction{
    ListTableViewController *listVC = [ListTableViewController new];
    listVC.poiString = self.textField.text;
    [self.navigationController pushViewController:listVC animated:YES];

    // Do any additional setup after loading the view, typically from a nib.
    

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
